import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import uView from '@/uni_modules/uview-ui'
import httpInit from '@/api/request.js'
import init from '@/common/init.js'
import store from '@/store'
import mixins from '@/common/mixins'
Vue.config.productionTip = false
App.mpType = 'app'
Vue.use(uView);
// request  请求 初始化
httpInit();


Vue.mixin(mixins)

const app = new Vue({
	...App,
	store
})

//  初始化

init().then(res => {
	app.$mount();
	//  做一次鉴权  
	if(res===1){
		uni.navigateTo({
			url:'pages/user/login'
		})
	}
})


// #endif































// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif
